<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateGameZghtpHongbaoTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('game_zghtp_hongbao', function (Blueprint $table) {
            $table->increments('id');
            $table->string('hb_key', 64)->unique();//红包主键
            $table->integer('uid');//用户id
            $table->integer('from_uid');//来源用户id
            $table->date('date'); //抢红包的日期
            $table->decimal('money', 10, 2)->unsigned()->default(0);//红包值
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('game_zghtp_hongbao');
    }
}
